package com.xuchaotong.concurrent;

import java.util.concurrent.*;

public class ThreadPoolExample {
    public static void main(String[] args) {
        BlockingQueue<Runnable> blockingQueue = new LinkedBlockingQueue<>();
        ThreadPoolExecutor executor = new ThreadPoolExecutor(3,8,0l, TimeUnit.SECONDS,blockingQueue);
        int coreThreadCount = executor.prestartAllCoreThreads();
        /*executor.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("这个是具体的任务");
            }
        });*/
//        System.out.println("核心线程数：" + coreThreadCount);
    }
}
